/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80019
 Source Host           : localhost:3306
 Source Schema         : youliao

 Target Server Type    : MySQL
 Target Server Version : 80019
 File Encoding         : 65001

 Date: 07/07/2020 14:52:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for admin_api_menus
-- ----------------------------
DROP TABLE IF EXISTS `admin_api_menus`;
CREATE TABLE `admin_api_menus` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '接口名称',
  `controller` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '控制器',
  `action` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '方法名',
  `is_check` tinyint NOT NULL DEFAULT '1' COMMENT '是否校验权限',
  `pid` int NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Api接口配置';

-- ----------------------------
-- Records of admin_api_menus
-- ----------------------------
BEGIN;
INSERT INTO `admin_api_menus` VALUES (1, '登录接口', 'App\\Admin\\Controllers\\LoginController', 'login', 0, 0, '2020-07-02 16:05:28', '2020-07-02 16:05:28');
INSERT INTO `admin_api_menus` VALUES (2, '退出登录', 'App\\Admin\\Controllers\\LoginController', 'logout', 0, 0, '2020-07-02 16:13:15', '2020-07-02 16:13:15');
INSERT INTO `admin_api_menus` VALUES (3, 'admin用户信息', 'App\\Admin\\Controllers\\AdminUserController', 'info', 1, 0, '2020-07-02 16:14:03', '2020-07-02 16:14:03');
INSERT INTO `admin_api_menus` VALUES (4, '菜单列表', 'App\\Admin\\Controllers\\MenusController', 'getMenu', 1, 0, '2020-07-02 16:14:32', '2020-07-02 16:14:32');
INSERT INTO `admin_api_menus` VALUES (5, '添加菜单', 'App\\Admin\\Controllers\\MenusController', 'addOrEditMenu', 1, 4, '2020-07-02 16:14:54', '2020-07-03 03:37:43');
INSERT INTO `admin_api_menus` VALUES (6, '删除菜单', 'App\\Admin\\Controllers\\MenusController', 'delMenu', 1, 4, '2020-07-02 16:15:55', '2020-07-02 17:46:40');
INSERT INTO `admin_api_menus` VALUES (7, '接口路由列表', 'App\\Admin\\Controllers\\ApiMenusController', 'list', 1, 0, '2020-07-03 11:40:30', '2020-07-03 11:40:30');
INSERT INTO `admin_api_menus` VALUES (8, '获取所有接口路由', 'App\\Admin\\Controllers\\ApiMenusController', 'getAllList', 1, 7, '2020-07-03 15:41:01', '2020-07-03 15:41:01');
INSERT INTO `admin_api_menus` VALUES (9, '编辑接口路由', 'App\\Admin\\Controllers\\ApiMenusController', 'addOrEditMenu', 1, 7, '2020-07-03 15:47:28', '2020-07-03 15:47:28');
INSERT INTO `admin_api_menus` VALUES (10, '删除接口路由', 'App\\Admin\\Controllers\\ApiMenusController', 'delMenu', 1, 7, '2020-07-03 15:47:53', '2020-07-03 15:47:53');
INSERT INTO `admin_api_menus` VALUES (11, '用户列表', 'App\\Admin\\Controllers\\UserController', 'list', 1, 0, '2020-07-03 15:48:50', '2020-07-03 15:48:50');
INSERT INTO `admin_api_menus` VALUES (12, '角色列表', 'App\\Admin\\Controllers\\RolesController', 'list', 1, 0, '2020-07-03 15:49:22', '2020-07-03 15:49:22');
INSERT INTO `admin_api_menus` VALUES (13, '角色下拉列表', 'App\\Admin\\Controllers\\RolesController', 'selectList', 1, 12, '2020-07-03 15:49:36', '2020-07-03 15:49:36');
INSERT INTO `admin_api_menus` VALUES (14, '添加角色', 'App\\Admin\\Controllers\\RolesController', 'addOrEditRole', 1, 12, '2020-07-03 15:49:53', '2020-07-03 15:49:53');
INSERT INTO `admin_api_menus` VALUES (15, '删除角色', 'App\\Admin\\Controllers\\RolesController', 'del', 1, 12, '2020-07-03 15:50:20', '2020-07-03 15:50:20');
INSERT INTO `admin_api_menus` VALUES (16, '管理员列表', 'App\\Admin\\Controllers\\AdminUserController', 'list', 1, 3, '2020-07-06 11:47:28', '2020-07-06 11:47:28');
INSERT INTO `admin_api_menus` VALUES (17, '删除管理员', 'App\\Admin\\Controllers\\AdminUserController', 'del', 1, 3, '2020-07-06 11:47:45', '2020-07-06 11:47:45');
INSERT INTO `admin_api_menus` VALUES (18, '编辑管理员', 'App\\Admin\\Controllers\\AdminUserController', 'addOrEditAdmin', 1, 3, '2020-07-06 11:48:19', '2020-07-06 11:48:19');
INSERT INTO `admin_api_menus` VALUES (19, 'admin登录信息', 'App\\Admin\\Controllers\\AdminUserController', 'info', 1, 3, '2020-07-06 20:33:55', '2020-07-06 20:33:55');
INSERT INTO `admin_api_menus` VALUES (20, '左边导航菜单', 'App\\Admin\\Controllers\\MenusController', 'menu', 1, 4, '2020-07-07 11:08:45', '2020-07-07 11:08:45');
COMMIT;

-- ----------------------------
-- Table structure for admin_menus
-- ----------------------------
DROP TABLE IF EXISTS `admin_menus`;
CREATE TABLE `admin_menus` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `path` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '路径',
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '路由名称',
  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '标题',
  `icon` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图标',
  `component` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `pid` int NOT NULL DEFAULT '0',
  `api_menu_ids` varchar(255) COLLATE utf8mb4_general_ci NOT NULL COMMENT '接口菜单',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='菜单';

-- ----------------------------
-- Records of admin_menus
-- ----------------------------
BEGIN;
INSERT INTO `admin_menus` VALUES (1, '/', '首页', '首页', '', '', 0, '', '2020-07-06 20:36:47', '2020-07-06 12:42:41');
INSERT INTO `admin_menus` VALUES (2, '/user', '用户管理', '用户管理', '', '', 0, '', '2020-06-20 17:12:19', '2020-07-06 20:38:22');
INSERT INTO `admin_menus` VALUES (3, 'user', '用户列表', '用户列表', 'user', 'user/index', 2, '', '2020-06-20 17:14:46', '2020-07-06 20:39:21');
INSERT INTO `admin_menus` VALUES (4, '/role', '系统管理', '系统管理', 'el-icon-setting', '', 0, '', '2020-06-21 11:52:53', '2020-07-06 20:38:18');
INSERT INTO `admin_menus` VALUES (5, 'index', '角色管理', '角色管理', '', 'role/index', 4, '', '2020-06-21 11:53:32', '2020-07-06 20:39:23');
INSERT INTO `admin_menus` VALUES (6, 'menu', '菜单配置', '菜单配置', '', 'role/menu', 4, '4,5,6', '2020-06-21 11:54:22', '2020-07-06 20:39:24');
INSERT INTO `admin_menus` VALUES (7, 'apimenu', '接口路由配置', '接口路由配置', '', 'role/apimenu', 4, '', '2020-06-24 17:03:50', '2020-07-06 20:39:26');
INSERT INTO `admin_menus` VALUES (8, '/adminUser', '管理员设置', '管理员设置', 'peoples', '', 0, '', '2020-07-06 11:46:53', '2020-07-06 20:38:10');
INSERT INTO `admin_menus` VALUES (9, 'list', '管理员列表', '管理员列表', 'peoples', 'admin/index', 8, '3,16,17,18', '2020-07-06 14:24:22', '2020-07-06 20:39:32');
INSERT INTO `admin_menus` VALUES (12, '/', '首页', '首页', 'dashboard', 'dashboard/index', 1, '3,4,19,20', '2020-07-06 20:42:04', '2020-07-07 03:09:10');
COMMIT;

-- ----------------------------
-- Table structure for admin_roles
-- ----------------------------
DROP TABLE IF EXISTS `admin_roles`;
CREATE TABLE `admin_roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
  `menu_ids` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '菜单权限',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of admin_roles
-- ----------------------------
BEGIN;
INSERT INTO `admin_roles` VALUES (1, '管理员', '1,2,3,4,5,6', '2020-06-20 17:19:53', '2020-07-02 16:41:06');
INSERT INTO `admin_roles` VALUES (2, '1级管理员', '1,2,3,12', '2020-06-29 17:37:17', '2020-07-06 12:43:48');
COMMIT;

-- ----------------------------
-- Table structure for admins
-- ----------------------------
DROP TABLE IF EXISTS `admins`;
CREATE TABLE `admins` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `role_id` int NOT NULL DEFAULT '0',
  `is_admin` int NOT NULL DEFAULT '0' COMMENT '是否是超级管理员',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of admins
-- ----------------------------
BEGIN;
INSERT INTO `admins` VALUES (1, '13100000001', '$2y$10$xJG9oZdrUkW8KbzkujUgKexL7rjGinJI1PamYEkCxwJd8Fe9tp9hC', '2020-06-20 16:06:56', '2020-07-06 20:21:22', 1, 1);
INSERT INTO `admins` VALUES (2, '13100000002', '$2y$10$7yLd7KHKqBUQv1YNxii59uXArouRRSyFroOzPYV85ZZom7J9C8wTm', '2020-07-06 17:58:33', '2020-07-06 17:58:33', 2, 0);
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `mobile` char(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '手机号',
  `wx_openid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '微信id',
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '邮箱',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '密码',
  `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '用户名',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '头像',
  `sign` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '签名',
  `is_vip` tinyint NOT NULL DEFAULT '0' COMMENT '是否是vip（0:不是，1:是）',
  `is_meeting` tinyint NOT NULL COMMENT '是否开启约会模式（0:不是，1:是）',
  `vip_end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_mobile` (`mobile`),
  KEY `idx_wx_openid` (`wx_openid`),
  KEY `idx_email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES (1, '13100000001', '', '', '$2y$10$xJG9oZdrUkW8KbzkujUgKexL7rjGinJI1PamYEkCxwJd8Fe9tp9hC', 'test111', '/static/img/avatar/meinv2.jpeg', '游客001sign', 1, 0, '2020-05-21 00:01:25', '2020-05-01 17:17:17', '2020-05-15 14:32:34');
INSERT INTO `users` VALUES (2, '13100000002', '', '', '$2y$10$ehIt51QqAHAUjL.NhMY2wuPVdnV/Jv0LKCKKP3W41kZ7.6Y65pfZG', '游客002', '/static/img/face.jpg', '游客002sign', 0, 0, '2020-05-05 00:01:25', '2020-05-03 16:35:49', '2020-05-05 00:10:01');
INSERT INTO `users` VALUES (3, '13100000003', '', '', '$2y$10$k2dco06eY0CpZfeD6YkJg.JtsCHfhDDbmS/neK2ZznC1C131xUu/6', '游客003', '/static/img/face.jpg', '游客003sign', 0, 0, '2020-05-05 00:01:25', '2020-05-03 16:36:06', '2020-05-05 00:10:06');
INSERT INTO `users` VALUES (4, '13100000004', '', '', '$2y$10$XHTvMp3itRRgvSUTygJvPuxn1T9eqDnVD0PFfSb5GAUNrJ9wfSsFi', '游客004', '/static/img/face.jpg', '游客004sign', 0, 0, '2020-05-05 00:01:25', '2020-05-03 16:37:15', '2020-05-05 00:10:09');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
